package com.ysu.yybk.exception;


import com.ysu.yybk.enums.ResultEnum;
import lombok.Getter;

@Getter
public class YybkException extends RuntimeException {

    private Integer code;

    public YybkException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public YybkException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}
